/********************************************************************************
 *      Copyright:  (C) 2023 LN
 *                  All rights reserved.
 *
 *       Filename:  socket_client.h
 *    Description:  This file 
 *
 *        Version:  1.0.0(2023年04月07日)
 *         Author:  Li Haipeng <NULL>
 *      ChangeLog:  1, Release initial version on "2023年04月07日 17时31分09秒"
 *                 
 ********************************************************************************/
#ifndef __SOCKET__CLIENT_H_
#define __SOCKET__CLIENT_H_
 
#include "pack_data.h"

typedef struct socket_send
{
	int		fd;
	char	host[64];
	int		port;
	int		connected;
}socket_t;

#define MAX_EVENTS      512
#define ARRAY_SIZE(x)   (sizeof(x)/sizeof(x[0]))

int socket_connect(socket_t *sock);
int socket_server_init(socket_t *sock);
int socket_data_send(socket_t *sock,packet_t *pack);
int socket_diag(socket_t *sock);
int socket_connect(socket_t *sock);
int socket_write(socket_t *sock, char *data, int bytes);
int socket_close(socket_t *sock);

#endif

